package com.zishi.model.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.Alias;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author TP
 * @since 2022-05-05 08:53:41
 */
@Data
@Accessors(chain = true)
@TableName("user")
@Alias("User")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @TableField("`name`")
    private String name;

    /**
     * 用户openid
     */
    @TableField("openid")
    private String openid;

    /**
     * 用户头像地址
     */
    @TableField("favicon")
    private String favicon;

    /**
     * 性别
     */
    @TableField("sex")
    private String sex;

    /**
     * 年龄
     */
    @TableField("age")
    private Integer age;

    /**
     * 用户状态,1可用,0不可用
     */
    @TableField("state")
    private Integer state;

    /**
     * 用户角色,1为user,0为admin
     */
    @TableField("role")
    private Integer role;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtModified;

    /**
     * 逻辑删除
     */
    @TableField("deleted")
    @TableLogic
    private Integer deleted;

}
